package com.huawei.appmarket.service.appzone.view.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import o.ewm.h;
import o.ewm.j;

public class NoDataView extends LinearLayout {
    protected View ˋ = null;
    protected ImageView ˎ = null;
    protected TextView ॱ = null;

    public NoDataView(Context context) {
        super(context);
        ˏ(context);
    }

    public NoDataView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        ˏ(context);
    }

    private void ˏ(Context context) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        layoutParams.gravity = 16;
        this.ˋ = LayoutInflater.from(context).inflate(h.ˑॱ, null);
        this.ॱ = (TextView) this.ˋ.findViewById(j.ᐧʽ);
        this.ˎ = (ImageView) this.ˋ.findViewById(j.ᐡ);
        addView(this.ˋ, layoutParams);
    }

    public void setHeight(int i) {
        if (i <= 0) {
            i = 0;
        }
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.ˋ.getLayoutParams();
        layoutParams.height = i;
        this.ˋ.setLayoutParams(layoutParams);
    }

    public void ˎ() {
        setVisibility(8);
    }

    public void ˊ() {
        setVisibility(0);
    }

    public void setImage(int i) {
        ˏ().setImageResource(i);
    }

    public void setText(int i) {
        this.ॱ.setText(i);
    }

    public ImageView ˏ() {
        return this.ˎ;
    }
}
